Skip to main content

dropShadow

Type

property

Summary

Specifies the drop shadow to use for an object.

Syntax

set the dropShadow of object to <propertiesArray>
set the dropShadow[<propertyName>] of object to <propertyValue>

Description

Use the dropShadow property to create a shadow effect on an object. If the object is opaque, the shadow effect is applied to the exterior boundary of the object. If the object is transparent, the shadow is applied to the interior visible elements of the control: the text in the field, the label/name of the button (if shown) or the lines of the graphic. The dropShadow is an array style property, each key of the array controls a different dropShadow parameter that will affect its final appearance. The easiest way to adjust these properties is by using the Graphic Effects card of the property inspector which has full control over each parameter. To control the effect by script use the following properties:

  • dropShadow["color"] - The color of the shadow, in the format red, green, blue where each value is between 0 and 255.
  • dropShadow["blendMode"] - How the shadow is blended with objects behind it. This is one of the following values:
    • "normal": the shadow is laid over the background.
    • "multiply": this results in a darkening effect
    • "colorDodge" : this results in a lightening effect
  • dropShadow["opacity"] - How opaque the shadow is. The value is between 0 (fully transparent) and 255 (fully opaque).
  • dropShadow["filter"] - Which algorithm is used to render the shadow. This is one of the following options:
    • "gaussian": highest quality (and slowest)
    • "box3pass": high quality.
    • "box2pass": medium quality
    • "box1pass": low quality (and fastest) p style="margin-left: -2.75em"When using the "colorDodge" blend mode, it is recommended that you set the filter mode to "gaussian".< /p:::note[ dropShadow["size"] - The size of the shadow, i.e. how large the shadow is. This is between 0 and 255. ]

dropShadow["spread"] - This controls where the effect begins to blend. This is between 0 and 255.

  • dropShadow["distance"] - This controls how far the shadow is offset from the object. This is between 0 and 359.
  • dropShadow["angle"] - The controls the direction the shadow is cast in. This is between 0 and 360.

:::

Examples

set the dropShadow of button "Ok" to tDropshadowPropertiesArray
set the dropShadow["color"] of me to "255,0,0"

property: innerShadow, innerGlow, colorOverlay, outerGlow, blendLevel, ink

Compatibility and Support

Introduced

LiveCode 4.0.0

OS

mac

windows

linux

ios

android

Platforms

desktop

mobile

Thank you for your feedback!

Was this page helpful?